import Vue from 'vue'
import App from './App'
import router from './router'
import api from './http'
import i18n from './i18n'
import store from './store'
import global from '@/utils/global'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import 'font-awesome/css/font-awesome.min.css'
import '@/assets/iconfont/iconfont.css'
import { baseUrl } from "@/utils/global";
import VueClipboard from 'vue-clipboard2'
import Calendar from 'vue-mobile-calendar'
import VueCropper from 'vue-cropper'
import * as tools from "@/utils/tools";
Vue.prototype.$tools = tools
Vue.use(VueCropper)
Vue.use(Calendar);
import Cookies from "js-cookie";
import axios from 'axios'
Vue.use(ElementUI)
Vue.use(api)
axios.defaults.withCredentials = true
Vue.prototype.api = process.env.NODE_ENV === 'production' ? '' : '/api'
Vue.prototype.global = global
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
Vue.prototype.$axios = axios;
//rem
import 'amfe-flexible'
Vue.use(VueClipboard)
new Vue({
  el: '#app',
  i18n,
  router,
  store,
  render: h => h(App)
});
Vue.prototype.getAgentTempl = function (){
  window.open(baseUrl + "/template/招商数据模板.xls");
}
Vue.prototype.getStuTempl = function (){
  window.open(baseUrl + "/template/studentimporttemplate.xls");
}
Vue.prototype.getSchoolTempl = function (){
  window.open(baseUrl + "/template/schoolImportTemplate.xls");
}
Vue.prototype.getThreelTempl = function (){
  window.open(baseUrl + "/template/TripartiteTemplate.xls");
}
Vue.prototype.getSchoolDictTempl = function (){
  window.open(baseUrl + "/template/学校字典模板.xls");
}
Vue.prototype.get2CStuTempl = function (){
  window.open(baseUrl + "/template/2C分中心导入模板.xls");
}
// 跳转报单系统
Vue.prototype.getOrder = function (){
  window.open("https://101crm.chinaedu.com/oc/autoLoginOC");
}
// OEM卡下载更新模板
Vue.prototype.getOEMUpdateTempl = function (){
  window.open(baseUrl + "/template/OEMUpdate.xls");
}